package com.zrwl.poscloud.commons.feign;

import com.zrwl.poscloud.commons.config.feign.FeignConfiguration;
import com.zrwl.poscloud.commons.fallback.ServerCenterFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * 商户服务器中心微服务
 *
 * @author liusitong
 */
@FeignClient(name = "pos-server-center", configuration = FeignConfiguration.class, fallback = ServerCenterFeignFallback.class)
public interface ServerCenterFeignClient {

    /**
     * 向商户服务器转发请求
     */
    @RequestMapping(value = "/proxy/request", method = RequestMethod.POST)
    String proxyRequest(@RequestParam("serverType") String serverType, @RequestParam("companyCode") String companyCode, @RequestParam("meJsonStr") String meJsonStr, @RequestParam("requestUrl") String requestUrl, @RequestParam("requestHeaderJsonStr") String requestHeaderJsonStr, @RequestParam("requestParamJsonStr") String requestParamJsonStr);

}